package com.health.system.model.system;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


import com.health.system.javacommon.base.BaseEntity;

public class RolePermission extends BaseEntity {
	
	//date formats
	
	//columns START
	private java.lang.String id;
	private java.lang.String roleId;
	private java.lang.String permissionId;
	
	private java.util.ArrayList permissionList ;
	private Permission Permission;
	//columns END

	public RolePermission(){
	}

	public RolePermission(
		java.lang.String id
	){
		this.id = id;
	}

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	public java.lang.String getId() {
		return this.id;
	}
	public void setRoleId(java.lang.String value) {
		this.roleId = value;
	}
	
	public java.lang.String getRoleId() {
		return this.roleId;
	}
	public void setPermissionId(java.lang.String value) {
		this.permissionId = value;
	}
	
	public java.lang.String getPermissionId() {
		return this.permissionId;
	}

	public String toString() {
		return new ToStringBuilder(this)
			.append("Id",getId())
			.append("RoleId",getRoleId())
			.append("PermissionId",getPermissionId())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.append(getRoleId())
			.append(getPermissionId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof RolePermission == false) return false;
		if(this == obj) return true;
		RolePermission other = (RolePermission)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.append(getRoleId(),other.getRoleId())
			.append(getPermissionId(),other.getPermissionId())
			.isEquals();
	}

	public java.util.ArrayList getPermissionList() {
		return permissionList;
	}

	public void setPermissionList(java.util.ArrayList permissionList) {
		this.permissionList = permissionList;
	}

	public Permission getPermission() {
		return Permission;
	}

	public void setPermission(Permission permission) {
		Permission = permission;
	}
}

